Skip to main content

XSLT transformations

Analyze JSON data using the XSLT language (https://vason.io/open-xslt)

The XSLT feature enables you to analyze JSON data using the XSLT language.

XSLT

The XSLT language is usually applied only to XML documents. However, Vason allows using XSLT for transforming the structure of JSON.

Example XSLT transformations

<xsl:template>
<xsl:text>[</xsl:text>
<xsl:for-each select="//planets">
<xsl:text>"</xsl:text>
<xsl:value-of select="name"/>
<xsl:text>"</xsl:text>
<xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each>
<xsl:text>]</xsl:text>
</xsl:template>

User interface xslt tab

XSLTXSLT
  1. To use the XSLT feature for analyze JSON from the left panel open the xpath/xslt window by clicking the left Xpath/Xslt button or typing Alt+X and choosing the xslt tab.
  2. XSLT transformations:
    • In the middle of the xslt tab, there is a text editor where you can write your own XSLT transformations. Click on the run button or type Ctrl+Enter to execute it.
    • To execute a recent XSLT transformation immediately, simply click on the corresponding item in the recent (history) list. A list of recent queries can be found at the top of the xslt tab.
  3. See the XSLT transformation result below after executing.